IWorkflowClient<'TInput, 'TResult>Type
PackageFCQRS.Workflows
Starts and queries the instances of a registered workflow, from C#.
Specification
Kind
Type
Members
9
Examples
0
CancelAsyncSignature
this.CancelAsync
OutcomeAsyncSignature
this.OutcomeAsync
ResultAsyncSignature
this.ResultAsync
ResumeAsyncSignature
this.ResumeAsync
SignalAsyncSignature
this.SignalAsync
Summary
| Name | Signature | Synopsis |
|---|---|---|
| CancelAsync | this.CancelAsync | Cancels the instance. |
| OutcomeAsync | this.OutcomeAsync | Waits up to `timeout` for the workflow to end and gives how it ended: finished, faulted, or cancelled. |
| ResultAsync | this.ResultAsync | Waits up to `timeout` for the workflow to end and gives its result. |
| ResumeAsync | this.ResumeAsync | Resumes a faulted instance at the step whose failure faulted it. |
| SignalAsync | this.SignalAsync | Stores a signal for the instance. |
| StartAsync | this.StartAsync | Starts the workflow with this ID under a reuse policy. |
| StartAsync | this.StartAsync | Starts the workflow with this ID. |
| StatusAsync | this.StatusAsync | Where the instance is. |
| Name | this.Name | The workflow's name. |
Cancels the instance. Returns once the request is stored.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string |
Returns
Task
Waits up to `timeout` for the workflow to end and gives how it ended: finished, faulted,
or cancelled. Throws `TimeoutException` when the time passes, and
`InvalidOperationException` when no workflow with this ID was started.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | |
| timeout | TimeSpan |
Returns
Task<WorkflowOutcome<'TResult>>
Waits up to `timeout` for the workflow to end and gives its result. Throws
`WorkflowFaultedException`, `WorkflowCancelledException`, or `TimeoutException`.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | |
| timeout | TimeSpan |
Returns
Task<'TResult>
Resumes a faulted instance at the step whose failure faulted it. Steps that completed before
the failure do not run again. Throws `InvalidOperationException` when the instance has not
faulted, when the body threw its own exception, or when it ran steps after the failure.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string |
Returns
Task
Stores a signal for the instance. Returns once it is stored.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | |
| name | string | |
| payload | 'TSignal |
Returns
Task
Starts the workflow with this ID under a reuse policy. With `WorkflowIdReuse.AfterFailure`,
an instance that faulted or was cancelled starts a new run with this input. True when this
call started the workflow or a new run; false when it stored nothing.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | |
| input | 'TInput | |
| reuse | WorkflowIdReuse |
Returns
Task<bool>
Starts the workflow with this ID. True when this call started it; false when a workflow
with this ID already existed, in which case nothing was stored.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | |
| input | 'TInput |
Returns
Task<bool>
Where the instance is.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string |
Returns
Task<WorkflowStatus>